package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.annotation.AutoFill;
import com.itheima.enumeration.OperationType;
import com.itheima.pojo.entity.Student;
import com.itheima.pojo.dto.StudentQuery;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {
    //public List<Student> page(StudentQuery studentQuery);


    //void delete(List<Integer> ids);

//    @AutoFill(OperationType.INSERT)
//    @Insert("insert into student (name,no,gender,phone,id_card,is_college,address" +
//            ",degree,graduation_date,clazz_id,update_time,create_time) " +
//            "values (#{name},#{no},#{gender},#{phone},#{idCard},#{isCollege},#{address}" +
//            ",#{degree},#{graduationDate},#{clazzId},#{updateTime},#{createTime});")
//    void insertStudent(Student student);

//    @Select("select id, name, no, gender, phone, id_card, is_college, address, degree, " +
//            "graduation_date, clazz_id, violation_count, violation_score, create_time, " +
//            "update_time from student where id = #{id};")
//    Student findById(Integer id);

//    @AutoFill(OperationType.UPDATE)
//    void update(Student student);

//    @Select("select * from student where student.clazz_id = #{clazzId};")
//    List<Student> findByClazzId(Integer clazzId);
}
